package com.Pan.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 常量
 * @Author: zhangjie
 * @Date: 4/9/18 AM10:15
 */
public class AppContants {

    public static final String SUCCESS ="SUCCESS";
    public static final String FAILED ="FAILED";
    public static final String ZERO ="0";
    public static final String ONE ="1";
    public static final String TWO ="2";
    public static final String THREE ="3";

    public static final String ALIYUNSMSOK ="OK";

    public static final String POINT =".";
    public static final String COMMA =",";
    public static final String LINE ="-";
    public static final String DOWN_LINE ="_";

    /**
     * 默认分页数
     */
    public static int DEFAULT_PAGESIZE = 10;

    /**
     * 最小可撤回时间
     */
    public static int REVOKE_TIME = 30;

    /**
     * 接口请求限制key后缀
     */
    public static final String LIMIT ="limit";


    /**
     * 规划提交类型
     */
    public static final String PLAN_ADD ="1";
    public static final String PLAN_DEL ="2";


    /**
     * 请求参数Key
     */
    public static final String PARAM_INPUT ="input";

    /**
     * traceId
     */
    public static final String HEADER_TRACE_ID ="traceId";

    /**
     * 请求参数Key
     */
    public static final String HEADER_PLATFORM ="platform";

    /**
     * 请求参数Key
     */
    public static final String HEADER_TOKEN ="token";

    /**
     * 免加解密的key
     */
    public static final String HEADER_CODE ="encodeKey";

    public static final String SOURCE_KEY ="sourceKey";

    public static final String SOURCE_KEY_VALUE_AUTOTEST ="autotest";

    public static final String APP_NAME ="lenz-mobile";

    /**
     * 用户中心 user表 type
     */
    public static final Integer USER_CENTER_USER_TYPE = 1;

    /**
     * 朗境通标准版app所属公司
     */
    public static final String APP_COMPANY ="LENZ";

    /**
     * 成功消息的key（国际化）
     */
    public static final String REQUEST_SUCCESS = "request.success";

    /**
     * 国际化
     */
    public static LocaleMessageService localeMessageService;

    public static void setLocaleMessageService(LocaleMessageService localeMessageService) {
        AppContants.localeMessageService = localeMessageService;
    }

    /**
     * 压缩设置和压缩比的对应关系
     */
    public static Map<String,Double> compressionRatioMap = new HashMap<>();

    static {
        compressionRatioMap.put("0",0.45);
        compressionRatioMap.put("1",0.4);
        compressionRatioMap.put("2",0.3);
        compressionRatioMap.put("3",0.0);
        compressionRatioMap.put("4",0.0);
    }

    public static final String FILE_SUFFIX_XSLX = ".xlsx";

    /**
     * 主任务列表点聚合两点间最短距离（KM）
     */
    public static final double POINT_TOGETHER_DISTANCE = 0.05;

    /**
     * 主任务列表版本
     */
    public static final String VERSION_V2 = "V2";

    /**
     * 朗境通
     */
    public static final String LENZ ="lenz";

    /**
     * 朗境通
     */
    public static final String DEV ="dev";
    public static final String PROD ="prod";
    public static final String TEST_API_POC ="test_api_poc";

    /**
     * 企业数据参数分隔符
     */
    public static final String BUSINESS_DATA_PARAM ="_lenz_";

    public static final String JPG ="jpg";
    public static final String JPEG ="jpeg";
    public static final String PNG ="png";

    /**
     * 天过滤+结束时间
     */
    public static final String DATE_NED_HOUR =" 23:59:59";

    /**
     * 空值
     */
    public static final String VALUE_BLANK ="";

    /**
     * 换行
     */
    public static final String VALUE_NEWLINE = "\r\n";

    /**
     * ip
     */
    public static final String KEY_IP ="ip";
    /**
     * 消耗时间
     */
    public static final String KEY_TIMEELAPSED ="time";

    /**
     * http访问路径
     */
    public static final String KEY_URL_PATH ="url_path_name";

    /**
     * 访问路径
     */
    public static final String KEY_URL_PATH_THRID ="url_name";

    /**
     * 问号
     */
    public static final String URL_QUESTION_MARK ="?";

    /**
     * 括号
     */
    public static final String BRACKETS_START_CHN ="【";
    public static final String BRACKETS_END_CHN ="】";

    /**
     * 整改题型内层默认type
     */
    public static final int RECTIFY_QUESTION_TYPE_INSIDE = 10002;

    /**
     * 整改题型外层默认type
     */
    public static final int RECTIFY_QUESTION_TYPE_OUTSIDE = 10001;

    /**
     * 反斜杠
     */
    public static final String BACKSLASH = "/";

    /**
     * 阿里云OSS公共路径
     */
    public static final String ALIYUN_OSS_PATH = "http://prod-app.ppznet.com/";

    public static final String REDIS_KEY_PREFIX = "api-service_";

    public static final Integer RESPONSE_TEST = 1;

}
